package com.jming.jike.dto.backend;

import com.jming.jike.common.ValidatorGroup.Insert;
import com.jming.jike.common.ValidatorGroup.Update;
import com.jming.jike.dto.BaseDTO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;

/**
 * @author jinming.zhang
 * @version 0.0.1
 * @date 2022/04/19
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class DishFlavorDTO extends BaseDTO {

    @ApiModelProperty(value = "口味名称")
    @NotBlank(message = "口味名称不能为空", groups = {Insert.class, Update.class})
    @Length(max = 10, message = "口味名称不能超过{max}个字符", groups = {Insert.class, Update.class})
    private String name;

    @ApiModelProperty(value = "口味数据list")
    @NotBlank(message = "口味数据不能为空", groups = {Insert.class, Update.class})
    private String value;

}
